import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * helper模块-用户信息
 */
@Entity('helper_user_info')
export class HelperUserInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID', length: 50 })
  userId: string;

  @Column({ comment: '名称', length: 100 })
  name: string;

  @Column({ comment: '备注', nullable: true })
  remark: string;

  @Column({ comment: '是否压缩 0-否 1-是', default: 0 })
  isZip: number;

  @Column({ comment: 'URL', nullable: true })
  url: string;

  @Column({ comment: '图标', nullable: true })
  icon: string;

  @Column({ comment: '配置', type: 'mediumtext', nullable: true })
  config: string;

  @Column({ comment: '主题颜色', nullable: true })
  themeColor: string;

  @Column({ comment: '背景颜色', nullable: true })
  bgColor: string;

  @Column({ comment: '标签页', nullable: true })
  tab: string;

  @Column({ comment: '屏幕方向 0-纵向 1-横向', default: 0 })
  screenOrientation: number;

  @Column({ comment: '是否全屏 0-否 1-是', default: 0 })
  fullScreen: number;

  @Column({ comment: '是否需要预加载 0-否 1-是', default: 0 })
  needPreload: number;

  @Column({ comment: '首次操作上报 0-否 1-是', default: 0 })
  firstActionReport: number;

  @Column({ comment: '归因到', nullable: true })
  imputeTo: string;

  @Column({ comment: '上报周期', nullable: true })
  reportCycle: string;

  @Column({ comment: '状态 0-未部署 1-部署中 2-已部署 3-部署失败', default: 0 })
  status: number;

  @Column({ comment: '是否隐藏 0-否 1-是', default: 0 })
  hide: number;
}
